1. Field of the Invention
The present invention generally relates to a drawing control method, a drawing control apparatus, and a drawing control system, and more particularly, to a method, an apparatus, and a system for controlling a drawing unit to draw a frame.
2. Description of Related Art
Recently, in accordance with the development of computer graphic (CG) technology, a computer is often demanded to carry out more computation load when performing graphic drawing operations. In order to relieve the work burden undertaken by the central processing unit (CPU), it is conventional to dispose an additional graphics processing unit (GPU) on the computer mainboard, or additionally introduce a graphics card for assisting the computer to perform the graphic computation, so as to improve a speed of the graphic processing.
The GPU often operates along with a set of frame buffer when performing the graphic computation, for temporarily storing frames which are going to be displayed on the display. Such a frame buffer are desired to be capable of accommodating data of at least one entire frame, and providing for the display for fast accessing and instant displaying.
FIG. 1 is a block diagram illustrating a conventional embedded system 100 employing a GPU. Referring to FIG. 1, the embedded system 100 includes a CPU 110, a GPU 120, a system memory 130, a frame buffer 140, a display controller 150, and a display 160. The GPUS 120 is used for transferring graphic data to be displayed on the display 160 from the system memory 130 to the frame buffer 140. The GPU 120 is required to be capable of directly accessing graphic data stored in the system memory 130, and storing the graphic data into the frame buffer 140 in accordance with the First-In-First-Out (FIFO) principle, so that the graphic data to be displayed can be provided to the display 160 by the access and control of the display controller 150.
Unlike those conventional CPUs which adopt a serial computation, a typical GPU is configured with a parallel architecture for graphic processing in instantly dealing with a large amount of data. FIG. 2 is a schematic diagram illustrating a conventional GPU for processing graphic data. Referring to FIG. 2, the conventional technology processes graphic data by progressively drawing lines and processing multiple lines in parallel so as to improve the speed of graphic processing. As shown in FIG. 2, the GPU are equipped with a line buffer A, a line buffer B, and a line buffer C, for alternately storing data of different lines. When practically processing to drawing a frame, the GPU alternately stores data of three lines into the three sets of line buffers.
Referring to FIG. 2, when a line counter counts a counting number of 17, a background portion of the frame is stored in the line buffer A. When the line counter counts a counting number of 18, the line in the line buffer A is provided for the display to display. After displaying the frame of the 18th line, frames of other lines are continuously drawn and provided to overlap the frame data previously stored in the line buffer A.
It should be noted that at a time point displaying the 17th line, the GPU draws an object portion of the 19th line at the same time, and stores the same into the line buffer B; and at a time point displaying the 18th line, the GPU draws a background portion of the 19th line at the same time and stores the same into the line buffer B, and draws an object portion of the 20th line at the same time and stored the same into the line buffer C. In such a way, parallel processing and instant display can be achieved by the continuous line data alternately provided by these three sets of line buffers.
All graphic data obtained from the GPU are temporarily stored in a memory thereof. As such, only after the display displays the graphic data, the memory can be used to store data of a next line. However, considering the production cost, a GPU can be equipped with a memory (often a static memory) having a restricted memory volume. Therefore, only data of a certain amount of lines can be temporarily stored in the memory. Unfortunately, once an unexpected delay occurs in the graphic processing, subsequential display will be affected. According to the aforesaid example, the GPU is capable of temporarily storing data of three lines, and must be maintained for instant refreshing. Whenever the graphic processing of any one of the lines delays, a frame error (displaying an uncompleted line), or a frame delay (waiting for the completeness of the line and displaying thereafter) may occur. Further, most of the graphic drawing processing of the conventional technology such as drawing and frame decoding are controlled by hardware circuits, and the algorithms adopted therein are also defined and realized by certain circuits. As such, ordinary users are incapable of modifying the control process or performing a custom operation as desired. In this concern, the flexibility and performance of the GPU is relatively restricted.